<template name="plugin">
	<view>
		<scroll-view scroll-y class="page">
			<cu-custom :bgImage="bgImg">
				<block slot="content">
					<image src="/static/hhz.png" mode="aspectFill" style="width: 260upx;height: 60upx;"></image>
				</block>
			</cu-custom>
			<view class="cu-card">
				<view class="cu-item bg-img shadow-blur" :style="[{backgroundImage:'url('+item.img+')'}]" @tap="toChild(item.id)"
				 v-for="(item,index) in list" :key="index">
					<view class="cardTitle">
						{{item.name}}
					</view>
				</view>
			</view>
			<view class="cu-tabbar-height"></view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		name: "manage",
		data() {
			return {
				StatusBar: this.StatusBar,
				CustomBar: this.CustomBar,
				list: [],
				bgImg: this.imgPath+'starry.png'
			};
		},
		mounted() {
			this.refresh()
		},
		methods: {
			refresh() {
				this.showProject()
			},
			toChild(id) {
				if(id === '1' || id === 1) {
					uni.navigateTo({
						url: '../plugin/indexes'
					})
				} else {
					uni.navigateTo({
						url: '../plugin/animation?id='+id
					})
				}
				
			},
			showProject() {
				uni.request({
					url: this.serverPath + 'project/postProjectList',
					method: 'POST',
					header:{
						'Content-type':'application/x-www-form-urlencoded'
					},
					success:(res)=> {
						this.list = res.data.data
					}
				})
			}
		},
	}
</script>

<style>
	.page {
		height: 100vh;
	}

	.cardTitle {
		color: #fff;
		padding: 90upx 60upx;
		font-size: 40upx;
		font-weight: 300;
		transform: skew(-10deg, 0deg);
		position: relative;
		text-shadow: 0px 0px 6upx rgba(0, 0, 0, 0.3)
	}

	.cardTitle::before {
		content: "";
		position: absolute;
		width: 60upx;
		height: 6upx;
		border-radius: 20upx;
		background-color: #fff;
		display: block;
		top: 60upx;
		left: 50upx;
		transform: skew(10deg, 0deg);
	}

	.cardTitle::after {
		content: "";
		position: absolute;
		width: 140upx;
		border-radius: 6upx;
		height: 24upx;
		background-color: #fff;
		display: block;
		bottom: 76upx;
		left: 90upx;
		transform: skew(10deg, 0deg);
		opacity: 0.1;
	}
</style>
